<!DOCTYPE html>
<html>
<#include "/common/header.html">
<script src="/js/user/user.js"></script>

<body class="gray-bg">
	<div class="container-div ui-layout-center">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<div class="panel-body" style="padding-bottom:0px;">
					<div class="panel panel-default">
						<div class="panel-heading">用户查询</div>
						<div class="panel-body">
							<form id="userForm" class="form-horizontal">
								<div class="search-group">
									<label class="col-sm-1 control-label search-form-cell">用户名：</label>
									<div class="col-sm-2 search-form-cell">
										<input type="text" class="form-control search-form-text" id="user_username" name="user_username" />
									</div>

									<label class="col-sm-1 control-label search-form-cell">姓名：</label>
									<div class="col-sm-2 search-form-cell">
										<input type="text" class="form-control search-form-text" id="user_name" name="user.name"/>
									</div>

									<label class="col-sm-1 control-label search-form-cell">邮箱：</label>
									<div class="col-sm-2 search-form-cell">
										<input type="text" class="form-control search-form-text" id="user_email" name="user.email"/>
									</div>
									<label class="col-sm-1 control-label search-form-cell">手机号：</label>
									<div class="col-sm-2 search-form-cell ">
										<input type="text" class="form-control search-form-text" id="user_phone" name="user.phone"/>
									</div>
								</div>
								<div class="search-group">
									<label class="col-sm-1 control-label search-form-cell">地址：</label>
									<div class="col-sm-2 search-form-cell ">
										<input type="text" class="form-control search-form-text" id="user_address" name="user.address"/>
									</div>
									<label class="col-sm-1 control-label search-form-cell">创建日期：</label>
									<div class="col-sm-2 search-form-cell">
										<input placeholder="开始日期"  class="form-control search-form-time-left" id="createTimeStart" name="createTimeStart">
										<label class="control-label search-form-time-label">-</label>
										<input placeholder="结束日期"  class="form-control search-form-time-right" id="createTimeEnd" name="createTimeEnd">
									</div>
									<label class="col-sm-1 control-label search-form-cell">用户状态：</label>
									<div class="col-sm-2 search-form-cell">
										<select class="form-control search-form-select" name="user.status" id="user_status">
											<option value="">请选择用户状态</option>
											<option value="0">停用</option>
											<option value="1">启用</option>
										</select>
									</div>
								</div>
							</form>
							<div class="form-group">
								<div class="col-sm-12" style="text-align:center;">
									<button type="button" id="btn_query" onclick="searchUser()" class="btn btn-success btn-rounded btn-sm search-form-button">
										<i class="fa fa-search"></i>查询
									</button>
									<!--<button class="btn btn-success btn-rounded btn-sm search-form-button" id="btn_query"><i class="fa fa-search"></i>搜索</button>-->
									<button type="button" class="btn btn-info btn-rounded btn-sm search-form-button" onclick="reset()"><i class="fa fa-refresh"></i>重置</button>
									<br>
								</div>
							</div>
						</div>
					</div>

					<div class="bs-bars pull-left">
						<div class="btn-group-sm" id="toolbar">
							<a class="btn btn-primary"  onclick="addUser()" >
								<i class="fa fa-plus"></i> 新增
							</a>
							<a class="btn btn-info" onclick="editUser()">
								<i class="fa fa-edit"></i> 修改
							</a>
							<a class="btn btn-danger" id="btn_delete" onclick="deleteUser()">
								<i class="fa fa-remove"></i> 删除
							</a>
							<a class="btn btn-success" onclick="exportUser()">
								<i class="fa fa-download"></i> 导出
							</a>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="userTable"></table>
			</div>
		</div>
	</div>
	<div class="modal fade" id="userModal" tabindex="-1" role="dialog" aria-labelledby="userModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="userModalLabel">用户信息</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal">
						<div class="form-group">
							<label for="username" class="col-sm-2 control-label confirm-lable">用户名：</label>
							<div class="col-sm-4">
								<input type="email" class="form-control confirm-text" id="username" name="username">
							</div>
							<label for="name" class="col-sm-2 control-label confirm-lable">姓名：</label>
							<div class="col-sm-4">
								<input type="email" class="form-control confirm-text" id="name" name="name">
							</div>
						</div>
						<div class="form-group">
							<label for="phone" class="col-sm-2 control-label confirm-lable">手机号：</label>
							<div class="col-sm-4">
								<input type="password" class="form-control confirm-text" id="phone" name="phone">
							</div>
							<label for="email" class="col-sm-2 control-label confirm-lable">邮箱：</label>
							<div class="col-sm-4">
								<input type="email" class="form-control confirm-text" id="email" name="email">
							</div>
						</div>
						<div class="form-group">
							<label for="password" class="col-sm-2 control-label confirm-lable">密码：</label>
							<div class="col-sm-4">
								<input type="email" class="form-control confirm-text" id="password" name="password">
							</div>
						</div>
						<div class="form-group">
							<label for="status" class="col-sm-2 control-label confirm-lable">状态：</label>
							<div class="col-sm-4 bootstrap-switch-container" >
								<input type="checkbox" checked  id="status"  data-size="small"/>
							</div>
							<label for="sex" class="col-sm-2 control-label confirm-lable">性别：</label>
							<div class="col-sm-4" id="sex">
								<div class="radio radio-info radio-inline">
									<input type="radio" id="male" value="0" name="sex" checked="">
									<label for="male">男</label>
								</div>
								<div class="radio radio-inline">
									<input type="radio" id="female" value="1" name="sex">
									<label for="female">女</label>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label for="address" class="col-sm-2 control-label confirm-lable">地址：</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="address" name="address">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
					<button type="button" id="btn_submit" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
				</div>
			</div>
		</div>
	</div>
</body>
</html>